#!/bin/bash
echo "Begin"

# 创建frp目录
seafiledir="/home/SeaFile"
if [ ! -d $seafiledir ];then
  mkdir $seafiledir
fi
# 下载dockercompose
if [ ! -f $seafiledir/docker-compose.yaml ];then
  wget -N -P $seafiledir https://gitee.com/yifff/cent-os-init/attach_files/962755/download/docker-compose.yaml
  if [ $? -ne 0 ]; then
    echo "wget dockercompose fail exit"
    exit 8
  fi
fi

cd $seafiledir
docker-compose up -d

echo "end "